import React, { FC } from 'react'
import { PageHeader } from 'antd'

import NavBar from './nav-bar'

interface Props {
  children: React.ReactNode
  title: string
  subTitle?: string
}

const Layout: FC<Props> = ({ children, title, subTitle = '' }) => {
  return (
    <div>
      <NavBar />
      <PageHeader title={title} subTitle={subTitle} className='jumbotron' />
      <div style={{ width: '80vw', margin: 'auto' }}>{children}</div>
    </div>
  )
}

export default Layout
